﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FazaDemo.BL.AppFacade;
using FazaDemo.BL.SubDomains;

namespace FazaDemo.WebSiteMvc.Controllers
{
    public class LayoutController : Controller
    {

        private readonly IMenuReceiver receiver;

        public LayoutController()
        {
            receiver = new MenuReceiver();
        }

        public ActionResult Menu()
        {
            IEnumerable<MenuItem> menuItems = receiver.GetMenuItems();
            return Json(menuItems, JsonRequestBehavior.AllowGet);
        }
    }
}